package com.arpa.ntocc.common.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 登录账号表
 * </p>
 *
 * @author LEO
 * @since 2019-08-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_user_login")
public class UserLogin extends BasicEntity {

    private static final long serialVersionUID = 1L;

    public static final String USER_LOGIN_TYPE_WAREHOUSE = "WAREHOUSE";
    public static final String USER_LOGIN_TYPE_SHIPMENT = "SHIPMENT";
    public static final String USER_LOGIN_TYPE_PLATFORM = "PLATFORM";

    /**
     * 用户登录标识（登录账号）
     */
    @TableField("user_login_id")
    private String userLoginId;

    /**
     * 所属机构
     */
    @TableField("group_code")
    private String groupCode;



    /**
     * 密码
     */
    @TableField("current_password")
    private String currentPassword;

    /**
     * 盐
     */
    @TableField("salt")
    private String salt;

    /**
     * 外部授权id
     */
    @TableField("external_auth_id")
    private String externalAuthId;

    /**
     * 用户标识
     */
    @TableField("party_code")
    private String partyCode;


    /**
     * 仓库授权
     * {
     *   "warehouse": "仓库1",
     *   "shipment": [
     *     "货主1",
     *     "货主2",
     *     "货主3"
     *   ]
     * }
     */
    @ApiModelProperty(value = "'仓库授权'")
    @TableField("warehouse_authorization")
    private String warehouseAuthorization;

    /**
     * 货主授权
     * {
     *   "shipment": "货主1",
     *   "warehouse": [
     *     "仓库1",
     *     "仓库2",
     *     "仓库3"
     *   ]
     * }
     */
    @ApiModelProperty(value = "'货主授权'")
    @TableField("shipment_authorization")
    private String shipmentAuthorization;

    /**
     * 登录账号类型
     * WAREHOUSE（仓库）、SHIPMENT（入驻商）
     */
    @ApiModelProperty(value = "登录账号类型：WAREHOUSE（仓库）、SHIPMENT（入驻商）")
    @TableField("user_login_type")
    private String userLoginType;
}
